package com.lt73.publisher.listener;

import com.lt73.publisher.event.StudentEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @Author: hanxiao
 * @Date: 2022/4/14 10:55
 */
@Component
public class EventHandleListener {


    @EventListener
    public void handleEvent(StudentEvent studentEvent) throws Exception {

        System.out.println("啦啦啦");
        System.out.println("啦啦啦");
        System.out.println("啦啦啦");
        System.out.println(studentEvent.getStudent());
        studentEvent.getStudent().setName("ASDASD");
    }

}